<template>
  <div class="ResourceMonitoringbox">
    <div class="leftbox">
      <EnterpriseTree @handleClick="handleClick"></EnterpriseTree>
    </div>
    <div class="rightbox">
      <component :is="currentComponent" :treevalue="treevalue"/>
    </div>
  </div>
</template>
<script>
import EnterpriseTree from './components/TreeModel.vue'
export default {
  name: 'CallPoliceIndex',
  components:{
    EnterpriseTree
  },
  data() {
    return {
      currentComponent: '',
      treevalue:{}
    };
  },

  mounted() {
    
  },

  methods: {
    handleClick(val) {
      this.treevalue=val
      this.currentComponent = () => import(`./${val.className}/index.vue`)
    }
  },
};
</script>
<style lang="scss" scoped>
.ResourceMonitoringbox{
  padding: 10px;
  display: flex;
  height: 100%;
  .leftbox{
    width:300px;
    background-color: #fff;
    padding: 20px;
    margin-right: 10px;
  }
  .rightbox{
    width: calc(100% - 310px);
    height:100%;
    overflow-y: auto;
  }
}
::v-deep ::-webkit-scrollbar {
    display: none;
}
</style>